partial bugfix in mask generation (holes if dx,dy,dz,t << ds)