Fixed issue #312
Merge pull request #316 from hintjens/master

Fixed issue #312