Fixing minimal page dimensions and page display loop (1-based)