Changed deserialize method