Fixed regression bugs in the test suite