fix bug for city function