fix getPaperSize function