bug fix in pipelining