move all settings values declaration before read_settings.
fixes #763