fix test mode -- x_test_mode is only for the live gateway