fix reuse vertex on paths finding