Serializing to server properly