fixed vars bug