Various Bugfixes.