This fixes #1311, thanks @bartvde!
Merge pull request #1316 from capooti/issue-1311

This fixes #1311, thanks @bartvde!