Replace some switch_to_master with switch_thread