fix goroutine leak, ignore nil threads