Repaired latex and fixed bug
regex error repaired