Temporary fix for boundary condition with different kernels.