     vvCuda::checkError(&ok, cudaMemcpyToSymbol(c_tcStart, h_tcStart, sizeof(h_tcStart[0])*2), "cudaMemcpy tcStart");
     vvCuda::checkError(&ok, cudaMemcpyToSymbol(c_tcStep, h_tcStep, sizeof(h_tcStep[0])*2), "cudaMemcpy tcStep");
 
-    if(CompositionFunction compose = selectCompositionWithPrecision(this, sliceStep))
+    CompositionFunction compose = selectCompositionWithPrecision(this, sliceStep);
+    if(compose)
     {
         // do the computation on the device
         compose <<<grid, Patch>>>(

   shmsize += Base::vd->vox[Base::principal]*Base::vd->getBPV()*sizeof(Scalar);
#endif

   if(CompositionFunction compose = selectCompositionWithPrecision(this, sliceStep))
   {
       // do the computation on the device
       compose <<<to.y-from.y, nthreads, shmsize>>>(

    shmsize = 0;
#endif

    CompositionFunction compose = selectCompositionWithPrecision(this, sliceStep);
    if(compose)
    {
#ifdef PATCHES
        grid = dim3((to.x-from.x+Patch.x-1)/Patch.x, (to.y-from.y+Patch.y-1)/Patch.y);
