fix deletion bug.