I really dislike the current mayor of Genoa and would like to replace him with a friend of mine. So I revoked his title, but I am having a bit of trouble making my courtier the new mayor. If as a king I own an entire county, it used to be possible to simply grant some courtier a city title inside that county and that would automatically make them a mayor of the city (which could be used to create vassal merchant republics). I own the county of Genoa now, the City of Genoa is the capital holding, and all other holdings in the county are owned by vassals.
Now when I take a friend of mine from my court and attempt to grant him the county, he does not become a mayor. Instead, he becomes a count (suffering from a wrong demesne holding type penalty). I am not sure when this was changed, but how does one create a vassal merchant republic in this case (without suffering any penalties)?