         self->ctx=c;
         memcpy(c->dst_shape,shape,sizeof(c->dst_shape));
         CUTRY(cudaMalloc(&c->dst,sizeof(TPixel)*prod(shape,3)));
+        CUTRY(cudaMemset( c->dst,0,sizeof(TPixel)*prod(shape,3)));
     } catch(int) {
         return 0;
     }

            }
        }
                
        if(!any_less_than_zero4(lambdas)) // other boundary                            
        {   
            // Map source index
            float r[3];
            #pragma unroll

        tetrahedron(work.tetrads+i,cubeverts,indexes[i]);

    try {
        const unsigned BX=32*4,BY=1,WORK=32,N=prod(work.dst_shape,3);
        dim3 threads(BX,BY),
             blocks(1,N/BX/BY/WORK);
        CUTRY(cudaGetLastError());
        resample_k<BX,BY,WORK><<<blocks,threads>>>(work);
        CUTRY(cudaGetLastError());
    } catch(int) {
        return 0;
