Fixed rounding error with integer math that did not calculate the number
of rows correctly.