Making pattern matches more consistent