Fix bug introduced with 9a1b8f7b311922455ba644e005a3cd550245a963
Better pagination