Added exception handling for errors caused by no math ML in request. 

Also corrected regex for capturing previous errors.