fix another infinite loop potential bug for 2step look ahead
merge