fix decode bug