fixed decoder bug