fix the decode bug