Added validation and fixes to delete