Fixing pagination after "refactorings" :p