Fixed bug on delete method