Fixing failed test cases