A geometric construction of the modified quantum algebra of gl, was given i
n [BLM]. It was then observed independentely by Lusztig and Ginzburg-Tiasse
rot (see [L1], [GV]) that this construction admits an affine analogue in te
rms of periodic flags of lattices. However the compatibility of the canonic
al base of the modified algebra and of the geometric base given by intersec
tion cohomology sheaves on the affine flag variety was never proved. The ai
m of the paper is to prove this compatibility. As a consequence we prove a
recent conjecture of Lusztig (see [L1]). Of course, our proof would work al
so in the finite type case.