fixes #1068 pagination included when not neeeded

It fixes the bug in my case, but maybe there are some edge case I'm not aware off.