Fixed a deletion bug