Fixed typo in wav checking logic