Had forgotten to actually increment the loop counter on the optimizer :(