Added special logic to handle invalid delete operations