fix infinite reload bug