Remove trailing commas in selector