Simplify array creation.
Merge pull request #1602 from franzliedke/patch-10

Simplify array creation.
Fix bug with paginate queries.
Merge branch '4.0'