Merge "Fix an encoder/decode mismatch bug"