bugfixes for tests