FIX: Added proper state-restoration code to the ThemeContext: