fixed filling variables bug