fix for delete functionality.