Fix 'path' undefined, normalize it