Thanks so much for this! For me the loop was on line 1198.