Bugfixes to after testing.