decoder state bug fix.