Fixed a bug of read.