Fixed pagination for history