fix glitches with reading in data