add patch for prev/next