improved the stopping of serial goroutine