fixed bug with loading wav files