Fixes some data reading and printing bugs