Fix a bug in which the cost was set at two levels
Init visited for start node, result of bug fix in kernel