fix for deleting problem