Fixed deserialization bugs