Little fix on generate_paginator