Several Bugfixes