Fix bug where creating more than seven loops caused crash