fix big loop problem