Corrected private loop variables