Fix wave header removal and creation