Move to foreach for topocorr code.