Another bunch of fixes for tests