Replace i+=1 with i=i+1