fixes a bug when the preference is reset.