Route calculation fixes