fixed read and write command struct