Fix bug when path contains {, }