Small bugfixes
Merge pull request #23 from gchp/bugfix

Small bugfixes