getDistance fix for allies