Added possibility to use minimum distance for arrive behavior.