More fixes to make tests pass