fix the loading bug