Fix a bug on user pattern resolution.