Deletion bug fixes