Fixed calculation of beginning of solved path