some bugfixes
Merge pull request #2 from wgerlach/master

some bugfixes