 		if (paramsD.enableAggressiveTweak) {
 			derivVelRho.w = 0;
 		} else {
-			printf("Error! particle derivVelRho.w is NAN: thrown from SDKCollisionSystem.cu, UpdateFluidD !\n");
+			printf("Error! particle derivVelRho.w is NAN: thrown from SDKCollisionSystem.cu, UpdateFluidDKernel !\n");
+			*isErrorD = true;
 			return;
 		}
 	}

		Real3* sortedPosRad,  // input: sorted positions
		Real3* sortedVelMas,  // input: sorted velocities
		Real3* vel_XSPH_Sorted_D, Real4* sortedRhoPreMu,
		uint* cellStart, uint* cellEnd, uint numAllMarkers) {

	uint index = __mul24(blockIdx.x, blockDim.x) + threadIdx.x;
	if (index >= numAllMarkers)

			mR3CAST(sortedPosRad), mR3CAST(sortedVelMas),
			mR3CAST(vel_XSPH_Sorted_D), mR4CAST(sortedRhoPreMu),
			U1CAST(cellStart), U1CAST(cellEnd),
			numAllMarkers, isErrorD);

	cudaThreadSynchronize();
	cudaCheckError();
	//------------------------------------------------------------------------
	cudaMemcpy(isErrorH, isErrorD, sizeof(bool), cudaMemcpyDeviceToHost);
	if (isErrorH) {
		throw std::runtime_error ("Error! program crashed in  collideD!\n");
	}
	cudaFree(isErrorD);
	free(isErrorH);


//					// unroll sorted index to have the location of original particles in the sorted arrays
//					thrust::device_vector<uint> dummyIndex = gridMarkerIndex;
