fixed const issues in getpath method