fix not passing ranged var to goroutine