Fixes #1172
Merge pull request #1174 from xerora/1172-fix

Fixes #1172