If statements were passing through the regex