Two more bugs
Merge pull request #1274 from waveney/wav31

Two more bugs