dinamic perpage bug fix