fixed some issues with reading raw data and storing it