Fixed problems with reading in data in reversed array order