fixed small bug in deserializing