Fix excess printfs in inner loop.