Boundary correction