Fixed a bug in reading in data.