Fix js vars issue