Fix NPE in settings.