Fixed test for whether math errors are present.
Updating mgcmake.
Updating submodules.