fixed issue #901
fixed issue #901 (2)
fixed issue #901 (3)
Merge pull request #1116 from RoanKanninga/master

fixed issue #901