fixed some serialization function related problems
Merge commit '22de8d4ebb3e1142002ba4d91ad182ffb75c2fbb'