Fix #409
Merge pull request #1017 from stevenmg/patch-3

Fix #409