Fixed Delete functionality