Fixed encodeLength not getting saved to Class