Fixing a bug of "delete".