Fixes to get tests passing