Fixed logic for auto-syncing so that the preference behaves as expected