various fixes to get the tests to pass