 
 	__syncthreads();
 
-	if (index < _endIndex)
+	if( index < ( * endIndex ) )
 	{
 		BFSJob job = _queue[index];
 		BFSInnerNode node;

		clearShadowMap();
	}

	_h_startIndex = 0;
	_h_endIndex = obj.data.jobCount;
	rasterize
	( 
		obj, 

		clearDepthBuffer();
		clearShadowMap();

		rasterize
		( 
			obj, 
