Various bugfixes (closes #237, closes #236, closes #233)
Merge pull request #238 from ngodfraind/bugfix

Various bugfixes (closes #237, closes #236, closes #233)