various fixes to make all tests work