Fixing bug which caused an unnecessary Ajax call to the server when changing cities