Added additional checks in settings class .