Fixed bug in BoxPrimitive::calc_closest_point()