Fix bug in GetBoundary