fix bug that caused secondary loading each time.