updating patch for smart_paging