Delete functionality fixed