Fix issues with RegExps.