Fixed WaveReader readData() function