Fixed bugs on wav file loader.