 
             // Either count or add the item to the appropriate queue
             if (countOnly)
-                atomicAdd(&(d_queue_info.ptr()->queue_sizes[bin_index]), 1ULL);
+                atomicAdd(&(d_queue_info.ptr()->d_queue_sizes[bin_index]), 1ULL);
             else {
                 // TODO: long id?
                 int id = atomicAdd(&(d_queue_info.ptr()->d_queue_pos[bin_index]), 1ULL);

        }
        start_index = end_index;
    }
}



    for (auto log_factor=0; log_factor <= LOG_MAX; log_factor += 1) {
        threads_per = 1 << log_factor; 
        bin_index = ((log_factor == LOG_MAX) || (bin_index > bin_max)) ? bin_max : bin_offset + (log_factor+2)+1;
        end_index = queue_pos[bin_index];
        size = end_index - start_index;
        printf("threads_per: %d, size: %llu\n", threads_per, size); 
        if (size) {
