Issues #1141, #1142 and minor fixes
Version 3.5105
Merge pull request #1144 from waveney/wav31

3.5105