bug fix on wave header.