fix bugs for delete: string comparison