fixing a bad variable reference in the regex condition