fixes #541
Merge pull request #545 from eliantor/master

fixes #541