Fixing failing test cases