L'errore è altrove. Il ciclo che hai postato all'inizio, a patto che termini con
loop
funziona...anche con il cursore che avevi impostato tu (1,1)