Fixed problem with delete method