added error handling to settings fetch