Fixed passing path when currentPath is null