Make the axis implementation more tolerant of boundary conditions