Fix to make IDs safe for use in selector during automapping