Fixed problem of the segment not linking to each other correctly when
adding a route to the map.