fix bug in results per page variable