bug fixes with per_page value