Fixing Delete functionality