Fix test case errors