fix test for test_mode