Fix regex errors, missing exception.