fix bug:

1. when itemsCountOnePage is 0, it should take all items
2. when processItems is not defined, the items should be assigned in then either.