Fixed pagination errors.