fix var not found error