fixes and failing tests