Bugfixes in tests

Found some bugs in tests - just a simple fixes