Fix animation serialization when length is not specified