Added an additional check for target velocity of the next segment to fix velocity overrun with slow acceleration machines