fix host bug of calculating decoding matrix