bug fix in IR gen prototype