Further corrections to box() algorithm
Guard agaist null value