Call set_global_engine in set_current_engine if use_global_engine.