fixed a race condition in DWT97