Fixed a bug in deserialization