Corrected loop indices.wq