Fixes #1653
Merge pull request #1655 from miklosm/iss1653

Fix for #1653