fixing a Regex bug