Small fix in offset when computing regions.