Small fix in latex parse error function