Slight adjustment to new switch_prepared logic.