fix a silly bug with variable aliasing