Fixes to data parsing