Fix ClassCastException when no settings are present