Fix delete validation
Fix recursive bug in delete
Security fix