vst plugin works in wavelab le 7, but not in elements

I have a really strange problem. I wrote a wavelet denoiser, and envelope detector from musicdsp works in wavelab le 7, but not in elements 7. In elements it oscillates, but le and audacity computes the the envelope correctly. I’m using mda-vst-plugins as a template, modifying one plugin for denoiser. Using makefile is much easier for me than hacking the xcode (I’m on osx lion). This with vst sdk 2.4. What’s the difference with vst in elements and le? What could cause the unstableness?
tia
-matti