Fix read/write cycle to work correctly!