Fix decode,encode mixup.