bugfixes in test