Rearranges the order of operations during simulator switching to ensure that the previous simulator is properly stopped and disconnected before the new simulator is started.