Fix deletion bug.