Fix a bug in GetPath, tests pass now