Bugfix

improved accuracy of score heuristic by updating both ends of path