fixed decoder bugs