Fixes to delete functionality
Fixes to delete functionality