More read/write fixes