fix infinite loop problem. woops.