Fixed bugs in Cubic.add_boundaries