Fixed pagination bug.