Merge pull request #2 from Geodan/master

fixes from tom
Merge pull request #46 from stvno/master

Merge pull request #2 from Geodan/master