paginate sets the state if its not already set, fixing the way pagination works