Fix _.each, i declared at top rather than it for loop