fixing bugs in tests :(