Bugfixes
Fix tests.