Fixed #1024
Merge pull request #1204 from EPuncker/master

Fixed #1024