Added error handling for when the settings are nonexistent.