fix exception in getPath