fix race condition when cseq is stopped while generating next id