Fixes test failure, adds more tests