Fixed getPath when no path was found