fix test cases fail on remove()