Fix a bug in matching ordered list