Added will paginate array
Fixed pagination order issue