Fixed path ending problem