Fix decoder performance bug