fixed minor bug in wavelet