     evt_list += blockIdx.x * XOVER::THREADS_PER_BLOCK;
 #endif  // LOG_RANDOM_EVENTS
 
-    int seq_idx = blockIdx.x;
+    int_type seq_idx = blockIdx.x;
     while( seq_idx < nSequences ) {
 
         unsigned int * seq = sequences + (seq_idx * sequence_width);

        i = event_hash[tid];    // minimum event index
        __syncthreads();

        real_type accum = 0.;
        while (i < rand) {
            real_type t = rand_pool[ i ];

            accum += (log( t ) / (real_type)(rand - i));

            rand_pool[i++] = ((((real_type)tid) + (1.0 - exp(accum))) / ((real_type)XOVER::THREADS_PER_BLOCK));
        }
        __syncthreads();

#ifdef LOG_RANDOM_EVENTS
        pool[tid] = rand_pool[ tid ];

#endif  // USE_MERSENNE_TWISTER

        unsigned int rand = _find_poisson_maxk32( s_pois_cdf, x, max_k );

#ifdef LOG_RANDOM_EVENTS
        evt_list[tid] = rand;
        evt_list += XOVER::BLOCKS_PER_KERNEL * XOVER::THREADS_PER_BLOCK;
#endif  // LOG_RANDOM_EVENTS
        __syncthreads();

        for( i = 1; i < 32; i <<= 1 ) {
            unsigned int r = __shfl_up( rand, i );
