currentPath adjustments

fix implementation with ‘string’ type check.