fixes to make unit tests pass