Adding ml_error tests and fixing tests.