Fix bug in #669
Merge pull request #670 from timrae/develop

Fix bug in #669