Bugfixes everywhere
Merge branch 'hotfix-0.5.1'