fixed error with dropdown when switching between a country with states and another country with states

Fixes #2912