I've only had problems with phalanx units in cities. Cavalry goes fine, and normal infantry however occasionally run out the gates and in again when I order them to go to a location some blocks away.