switch to pathname on context.