Changed to/from LongLong to to/from (U)Int64
Correct length calculation