Fixed per_page() function. #857