WIP. More fixes for tests.