Fixed bug for deletion