Fixes issue #825.

Fixes issue #825 reported by @zlite