fixed error in loading data