Various bugfixes
Commit