fix the variable check in settings