fix var check