Page dimensions are now correctly calculated.