Fixes to make tests pass