Fix test case cleanup