fix port index error in lzr; Alloc/Yield opt