Fixed the formula. Will need some smoothing with the AutoMove behaviours.