Several Bugfixes.