Fix some gcc for loop errors.