Persisting switch values