fixes some bugs with CartesianBoundary