Fixed bugs with data parsing