Fixed serialize bug