Merge pull request #3 from log2/master

Bugfixes