Some fixes for tests