more error handling in settingcontroller