fix serialize bug