Fix delete.

fixes delete method.