Failed tests fixed