Fix bug in parsing path.