bugs in 2 unit tests