Rectified read.S and write.S