Solve a bug for init pathinfo