fixed loading bug