fix and implement decoder so KDecoder has fixed