A few fixes for tests