Fixes to get tests working