bug fix reported by Lauri
Merge pull request #465 from ffrensch/master

bug fix reported by Lauri