failing tests fixed