fixed array_paginate() helper