fix goroutine leak