solve issue #271
Merge pull request #273 from koeppea/master

Fix for issue #271