Rework the Preferences to prevent FOUC