fix a bug that starts goroutine twice