Fix length initialization in the Decoder