Problem with StatsChiTest when calling it through Optimize

I have function which I call through Optimize. The function calls the StatsChiTest operation and uses its results. This works fine when I call my function directly and the V_flag value for StatsChiTest is 0. But when the function is called through Optimize V_flag is -1 and the W_StatsChiTest wave remains unchanged. Could someone shed some light on this?
Greetings!

It is difficult to guess what is going on without getting more information. It would be best if you sent an IGOR experiment that demonstrates this problem to support@wavemetrics.com. Please let us know which version of IGOR you are using and what operating system you are working on.

A.G.
WaveMetrics, Inc.