fixed delete method bug