command struct serialization working sometimes