Fix little buig introduced by pagination changes