Some small fixes to dilation layer