Fixed a error when you have no sorting, and the getItems should return a array