Several fixes when testing.