         qgrams.begin(),
         qgrams.begin() + n_queries,
         ranges.begin(),
-        nvbio::plain_view( qgram_index ) );
+        nvbio::raw_pointer( qgram_index ) );
 
     cudaDeviceSynchronize();
     timer.stop();

    const uint32 n_hits = qgram_filter.rank(
        qgram_index,
        n_queries,
        nvbio::plain_view( sorted_qgrams ),
        nvbio::plain_view( sorted_indices ) );

    // loop through large batches of hits and locate them
    for (uint32 hits_begin = 0; hits_begin < n_hits; hits_begin += batch_size)

    sorted_qgrams = qgrams;
    sorted_indices.resize( n_queries );
    thrust::copy(
        thrust::make_counting_iterator<uint32>(genome_offset),
        thrust::make_counting_iterator<uint32>(genome_offset) + n_queries,
        sorted_indices.begin() );

    thrust::sort_by_key( sorted_qgrams.begin(), sorted_qgrams.end(), sorted_indices.begin() );
