Fixed a bug where app crashes when appsetting is set to null