Save/restore of simulator switches, fixes #1034