If you are really desperate to save the unit, you can always order them to Rout. If they are far from the map edge, you'll probably be able to rally them before they run away for good. This is really a last resort though as you have no control of the unit while it's routing.
I find it's sometimes helpful to press the pause, press the STOP button and then double click somewhere. Clicking Stop seems to make a difference sometimes.
Bookmarks