Bugfix Update

Multiple bugfixes, please see commit descriptions.