Bugfixes after testing.