Use clone to avoid illegal modification error.