Fix bug in getPath() function.
Fix bug in getPath() function.