Added pager.

Also, fixed error when the form isn't submitted.