Fixed change_number_of_cities to work much faster.