fix test case to terminate