fix faulty test cases