Fix goroutine leaks