Bugfixes after testing