fix config paths bug && fix path replace bugs