Added more deserialization logic