Fixes #30
Fixes #31
Merge branch 'hotfix/bugfixes'