fixes #542
Merge pull request #544 from eliantor/master

fixes #542