fixed decode bug