adjustment so row doesn't extend outside document