fix data loading bug