Refactor. Cater for app setting not existing