fixed terrible paginate syntax bug