Fixed bug with reading.