bug fixed for first order linear decoder