bugfixes in tests