bugfixes after testing