fix custom vars processing