Small code improvement when bulding the path