Merge pull request #842 from waveney/wav25

Bunch of fixes