Fix failing test cases