fixed deletion bug