 	  cub::DoubleBuffer<VertexId> d_output_buffer(d_output, output);
 	*/
 
-	SizeT *d_num_selected = NULL;
+	unsigned int *d_num_selected = NULL;
 	if (util::GRError((retval = cudaMalloc(
-	    (void**)&d_num_selected, sizeof(int))),
+	    (void**)&d_num_selected, sizeof(unsigned int))),
 	    "CUBSelect d_num_selected malloc failed",
 	    __FILE__, __LINE__)) return retval;
 

	VertexId  *d_input,
	SizeT     num_elements,
	VertexId  *d_output,
	SizeT     *num_selected)
    {
	cudaError_t retval = cudaSuccess;


	if (util::GRError((retval = cudaMemcpy(
	    num_selected,
	    d_num_selected,
	    sizeof(unsigned int),
	    cudaMemcpyDeviceToHost)),
	    "CUBSelect copy back num_selected failed",
	    __FILE__, __LINE__)) return retval;
