Fix various minor errors in tests.