fix calculating endNode in Path.rscCollected()