fix loading bug