diff --git a/src/plugins/unittest/tcp_test.c b/src/plugins/unittest/tcp_test.c
index c19d0f0..608f1ef 100644
--- a/src/plugins/unittest/tcp_test.c
+++ b/src/plugins/unittest/tcp_test.c
@@ -89,6 +89,7 @@
   tc->snd_una_max = 1000;
   tc->snd_nxt = 1000;
   tc->rcv_opts.flags |= TCP_OPTS_FLAG_SACK;
+  tc->snd_mss = 150;
   scoreboard_init (&tc->sack_sb);
 
   for (i = 0; i < 1000 / 100; i++)
@@ -110,8 +111,8 @@
   tcp_rcv_sacks (tc, 0);
 
   if (verbose)
-    vlib_cli_output (vm, "sb after even blocks:\n%U", format_tcp_scoreboard,
-		     sb);
+    vlib_cli_output (vm, "sb after even blocks (mss %u):\n%U",
+		     tc->snd_mss, format_tcp_scoreboard, sb, tc);
 
   TCP_TEST ((pool_elts (sb->holes) == 5),
 	    "scoreboard has %d elements", pool_elts (sb->holes));
@@ -127,7 +128,9 @@
   TCP_TEST ((sb->snd_una_adv == 0), "snd_una_adv %u", sb->snd_una_adv);
   TCP_TEST ((sb->last_sacked_bytes == 400),
 	    "last sacked bytes %d", sb->last_sacked_bytes);
-  TCP_TEST ((sb->high_sacked == 900), "max byte sacked %u", sb->high_sacked);
+  TCP_TEST ((sb->high_sacked == 900), "high sacked %u", sb->high_sacked);
+  TCP_TEST ((sb->lost_bytes == 200), "lost bytes %u", sb->lost_bytes);
+
   /*
    * Inject odd blocks
    */
@@ -141,8 +144,8 @@
   tcp_rcv_sacks (tc, 0);
 
   if (verbose)
-    vlib_cli_output (vm, "sb after odd blocks:\n%U", format_tcp_scoreboard,
-		     sb);
+    vlib_cli_output (vm, "\nsb after odd blocks:\n%U", format_tcp_scoreboard,
+		     sb, tc);
 
   hole = scoreboard_first_hole (sb);
   TCP_TEST ((pool_elts (sb->holes) == 1),
@@ -151,17 +154,18 @@
 	    "first hole start %u end %u", hole->start, hole->end);
   TCP_TEST ((sb->sacked_bytes == 900), "sacked bytes %d", sb->sacked_bytes);
   TCP_TEST ((sb->snd_una_adv == 0), "snd_una_adv %u", sb->snd_una_adv);
-  TCP_TEST ((sb->high_sacked == 1000), "max sacked byte %u", sb->high_sacked);
+  TCP_TEST ((sb->high_sacked == 1000), "high sacked %u", sb->high_sacked);
   TCP_TEST ((sb->last_sacked_bytes == 500),
 	    "last sacked bytes %d", sb->last_sacked_bytes);
+  TCP_TEST ((sb->lost_bytes == 100), "lost bytes %u", sb->lost_bytes);
 
   /*
    *  Ack until byte 100, all bytes are now acked + sacked
    */
   tcp_rcv_sacks (tc, 100);
   if (verbose)
-    vlib_cli_output (vm, "ack until byte 100:\n%U", format_tcp_scoreboard,
-		     sb);
+    vlib_cli_output (vm, "\nack until byte 100:\n%U", format_tcp_scoreboard,
+		     sb, tc);
 
   TCP_TEST ((pool_elts (sb->holes) == 0),
 	    "scoreboard has %d elements", pool_elts (sb->holes));
@@ -171,6 +175,7 @@
   TCP_TEST ((sb->sacked_bytes == 0), "sacked bytes %d", sb->sacked_bytes);
   TCP_TEST ((sb->last_sacked_bytes == 0),
 	    "last sacked bytes %d", sb->last_sacked_bytes);
+  TCP_TEST ((sb->lost_bytes == 0), "lost bytes %u", sb->lost_bytes);
 
   /*
    * Add new block
@@ -182,16 +187,14 @@
   block.end = 1300;
   vec_add1 (tc->rcv_opts.sacks, block);
 
-  if (verbose)
-    vlib_cli_output (vm, "add [1200, 1300]:\n%U", format_tcp_scoreboard, sb);
   tc->snd_una_max = 1500;
   tc->snd_una = 1000;
   tc->snd_nxt = 1500;
   tcp_rcv_sacks (tc, 1000);
 
   if (verbose)
-    vlib_cli_output (vm, "sb snd_una_max 1500, snd_una 1000:\n%U",
-		     format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nadd [1200, 1300] snd_una_max 1500, snd_una 1000:"
+		     " \n%U", format_tcp_scoreboard, sb, tc);
 
   TCP_TEST ((sb->snd_una_adv == 0),
 	    "snd_una_adv after ack %u", sb->snd_una_adv);
@@ -207,6 +210,7 @@
   TCP_TEST ((hole->start == 1300 && hole->end == 1500),
 	    "last hole start %u end %u", hole->start, hole->end);
   TCP_TEST ((sb->sacked_bytes == 100), "sacked bytes %d", sb->sacked_bytes);
+  TCP_TEST ((sb->lost_bytes == 0), "lost bytes %u", sb->lost_bytes);
 
   /*
    * Ack first hole
@@ -216,19 +220,19 @@
   tcp_rcv_sacks (tc, 1200);
 
   if (verbose)
-    vlib_cli_output (vm, "sb ack up to byte 1200:\n%U", format_tcp_scoreboard,
-		     sb);
+    vlib_cli_output (vm, "\nsb ack up to byte 1200:\n%U",
+		     format_tcp_scoreboard, sb, tc);
 
   TCP_TEST ((sb->snd_una_adv == 100),
 	    "snd_una_adv after ack %u", sb->snd_una_adv);
   TCP_TEST ((sb->sacked_bytes == 0), "sacked bytes %d", sb->sacked_bytes);
-  TCP_TEST ((pool_elts (sb->holes) == 1),
+  TCP_TEST ((pool_elts (sb->holes) == 0),
 	    "scoreboard has %d elements", pool_elts (sb->holes));
-  hole = scoreboard_first_hole (sb);
-  TCP_TEST ((hole->prev == TCP_INVALID_SACK_HOLE_INDEX
-	     && hole->next == TCP_INVALID_SACK_HOLE_INDEX), "hole is valid");
   TCP_TEST ((sb->last_bytes_delivered == 100), "last bytes delivered %d",
 	    sb->last_bytes_delivered);
+  TCP_TEST ((sb->lost_bytes == 0), "lost bytes %u", sb->lost_bytes);
+  TCP_TEST ((sb->head == TCP_INVALID_SACK_HOLE_INDEX), "head %u", sb->head);
+  TCP_TEST ((sb->tail == TCP_INVALID_SACK_HOLE_INDEX), "tail %u", sb->tail);
 
   /*
    * Add some more blocks and then remove all
@@ -246,7 +250,8 @@
 
   scoreboard_clear (sb);
   if (verbose)
-    vlib_cli_output (vm, "sb cleared all:\n%U", format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nsb cleared all:\n%U", format_tcp_scoreboard, sb,
+		     tc);
 
   TCP_TEST ((pool_elts (sb->holes) == 0),
 	    "number of holes %d", pool_elts (sb->holes));
@@ -267,14 +272,17 @@
   tc->rcv_opts.n_sack_blocks = vec_len (tc->rcv_opts.sacks);
   tcp_rcv_sacks (tc, 0);
   if (verbose)
-    vlib_cli_output (vm, "sb added odd blocks and ack [0, 950]:\n%U",
-		     format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nsb added odd blocks snd_una 0 snd_una_max 1500:"
+		     "\n%U", format_tcp_scoreboard, sb, tc);
+  TCP_TEST ((pool_elts (sb->holes) == 5),
+	    "scoreboard has %d elements", pool_elts (sb->holes));
+  TCP_TEST ((sb->lost_bytes == 200), "lost bytes %u", sb->lost_bytes);
 
   tcp_rcv_sacks (tc, 950);
 
   if (verbose)
-    vlib_cli_output (vm, "sb added odd blocks and ack [0, 950]:\n%U",
-		     format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nack [0, 950]:\n%U", format_tcp_scoreboard, sb,
+		     tc);
 
   TCP_TEST ((pool_elts (sb->holes) == 0),
 	    "scoreboard has %d elements", pool_elts (sb->holes));
@@ -282,6 +290,7 @@
   TCP_TEST ((sb->sacked_bytes == 0), "sacked bytes %d", sb->sacked_bytes);
   TCP_TEST ((sb->last_sacked_bytes == 0),
 	    "last sacked bytes %d", sb->last_sacked_bytes);
+  TCP_TEST ((sb->lost_bytes == 0), "lost bytes %u", sb->lost_bytes);
 
   /*
    * Inject one block, ack it and overlap hole
@@ -299,22 +308,26 @@
   tcp_rcv_sacks (tc, 0);
 
   if (verbose)
-    vlib_cli_output (vm, "sb added [100, 500]:\n%U",
-		     format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nsb added [100, 500] snd_una 0 snd_una_max 1000:"
+		     "\n%U", format_tcp_scoreboard, sb, tc);
 
   tcp_rcv_sacks (tc, 800);
 
   if (verbose)
-    vlib_cli_output (vm, "sb ack [0, 800]:\n%U", format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nsb ack [0, 800]:\n%U", format_tcp_scoreboard, sb,
+		     tc);
 
-  TCP_TEST ((pool_elts (sb->holes) == 1),
+  TCP_TEST ((pool_elts (sb->holes) == 0),
 	    "scoreboard has %d elements", pool_elts (sb->holes));
   TCP_TEST ((sb->snd_una_adv == 0), "snd_una_adv %u", sb->snd_una_adv);
   TCP_TEST ((sb->sacked_bytes == 0), "sacked bytes %d", sb->sacked_bytes);
-  TCP_TEST ((sb->last_sacked_bytes == 0),
-	    "last sacked bytes %d", sb->last_sacked_bytes);
+  TCP_TEST ((sb->last_sacked_bytes == 0), "last sacked bytes %d",
+	    sb->last_sacked_bytes);
   TCP_TEST ((sb->last_bytes_delivered == 400),
 	    "last bytes delivered %d", sb->last_bytes_delivered);
+  TCP_TEST ((sb->lost_bytes == 0), "lost bytes %u", sb->lost_bytes);
+  TCP_TEST ((sb->head == TCP_INVALID_SACK_HOLE_INDEX), "head %u", sb->head);
+  TCP_TEST ((sb->tail == TCP_INVALID_SACK_HOLE_INDEX), "tail %u", sb->tail);
 
   /*
    * One hole close to head, patch head, split in two and start acking
@@ -332,8 +345,12 @@
 
   tcp_rcv_sacks (tc, 0);
   if (verbose)
-    vlib_cli_output (vm, "sb added [500, 1000]:\n%U",
-		     format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nsb added [500, 1000]:\n%U",
+		     format_tcp_scoreboard, sb, tc);
+  TCP_TEST ((sb->sacked_bytes == 500), "sacked bytes %d", sb->sacked_bytes);
+  TCP_TEST ((sb->last_sacked_bytes == 500), "last sacked bytes %d",
+	    sb->last_sacked_bytes);
+  TCP_TEST ((sb->lost_bytes == 500), "lost bytes %u", sb->lost_bytes);
 
   vec_reset_length (tc->rcv_opts.sacks);
   block.start = 300;
@@ -342,18 +359,57 @@
   tc->rcv_opts.n_sack_blocks = vec_len (tc->rcv_opts.sacks);
   tcp_rcv_sacks (tc, 100);
   if (verbose)
-    vlib_cli_output (vm, "sb added [0, 100] [300, 400]:\n%U",
-		     format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nsb added [0, 100] [300, 400]:\n%U",
+		     format_tcp_scoreboard, sb, tc);
   TCP_TEST ((pool_elts (sb->holes) == 2),
 	    "scoreboard has %d elements", pool_elts (sb->holes));
+  TCP_TEST ((sb->sacked_bytes == 600), "sacked bytes %d", sb->sacked_bytes);
+  TCP_TEST ((sb->last_sacked_bytes == 100), "last sacked bytes %d",
+	    sb->last_sacked_bytes);
+  TCP_TEST ((sb->last_bytes_delivered == 0), "last bytes delivered %d",
+	    sb->last_bytes_delivered);
+  TCP_TEST ((sb->lost_bytes == 200), "lost bytes %u", sb->lost_bytes);
 
   tc->snd_una = 100;
   tcp_rcv_sacks (tc, 200);
+  tc->snd_una = 200;
   tcp_rcv_sacks (tc, 300);
   if (verbose)
-    vlib_cli_output (vm, "sb added [0, 300]:\n%U", format_tcp_scoreboard, sb);
+    vlib_cli_output (vm, "\nacked [0, 300] in two steps:\n%U",
+		     format_tcp_scoreboard, sb, tc);
   TCP_TEST ((sb->sacked_bytes == 500), "sacked bytes %d", sb->sacked_bytes);
+  TCP_TEST ((sb->lost_bytes == 100), "lost bytes %u", sb->lost_bytes);
+  TCP_TEST ((sb->last_bytes_delivered == 100), "last bytes delivered %d",
+	    sb->last_bytes_delivered);
 
+  tc->snd_una = 400;
+  tcp_rcv_sacks (tc, 500);
+  if (verbose)
+    vlib_cli_output (vm, "\nacked [400, 500]:\n%U", format_tcp_scoreboard, sb,
+		     tc);
+  TCP_TEST ((pool_elts (sb->holes) == 0),
+	    "scoreboard has %d elements", pool_elts (sb->holes));
+  TCP_TEST ((sb->sacked_bytes == 0), "sacked bytes %d", sb->sacked_bytes);
+  TCP_TEST ((sb->last_sacked_bytes == 0), "last sacked bytes %d",
+	    sb->last_sacked_bytes);
+  TCP_TEST ((sb->last_bytes_delivered == 500), "last bytes delivered %d",
+	    sb->last_bytes_delivered);
+  TCP_TEST ((sb->lost_bytes == 0), "lost bytes %u", sb->lost_bytes);
+  TCP_TEST ((sb->snd_una_adv == 500), "snd_una_adv %u", sb->snd_una_adv);
+  TCP_TEST ((sb->head == TCP_INVALID_SACK_HOLE_INDEX), "head %u", sb->head);
+  TCP_TEST ((sb->tail == TCP_INVALID_SACK_HOLE_INDEX), "tail %u", sb->tail);
+
+  /*
+   * Re-ack high sacked, to make sure last_bytes_delivered and
+   * snd_una_adv are 0-ed
+   */
+  tcp_rcv_sacks (tc, 1000);
+  if (verbose)
+    vlib_cli_output (vm, "\nAck high sacked:\n%U", format_tcp_scoreboard, sb,
+		     tc);
+  TCP_TEST ((sb->last_bytes_delivered == 0), "last bytes delivered %d",
+	    sb->last_bytes_delivered);
+  TCP_TEST ((sb->snd_una_adv == 0), "snd_una_adv %u", sb->snd_una_adv);
   return 0;
 }
 
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index d03388e..e75c77d 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -667,38 +667,41 @@
 static void
 scoreboard_update_bytes (tcp_connection_t * tc, sack_scoreboard_t * sb)
 {
-  sack_scoreboard_hole_t *hole, *prev;
+  sack_scoreboard_hole_t *left, *right;
   u32 bytes = 0, blks = 0;
 
   sb->lost_bytes = 0;
   sb->sacked_bytes = 0;
-  hole = scoreboard_last_hole (sb);
-  if (!hole)
+  left = scoreboard_last_hole (sb);
+  if (!left)
     return;
 
-  if (seq_gt (sb->high_sacked, hole->end))
+  if (seq_gt (sb->high_sacked, left->end))
     {
-      bytes = sb->high_sacked - hole->end;
+      bytes = sb->high_sacked - left->end;
       blks = 1;
+      if (bytes > (TCP_DUPACK_THRESHOLD - 1) * tc->snd_mss
+	  && left->prev == TCP_INVALID_SACK_HOLE_INDEX)
+	sb->lost_bytes += scoreboard_hole_bytes (left);
     }
 
-  while ((prev = scoreboard_prev_hole (sb, hole))
+  right = left;
+  while ((left = scoreboard_prev_hole (sb, right))
 	 && (bytes < (TCP_DUPACK_THRESHOLD - 1) * tc->snd_mss
 	     && blks < TCP_DUPACK_THRESHOLD))
     {
-      bytes += hole->start - prev->end;
+      bytes += right->start - left->end;
       blks++;
-      hole = prev;
+      right = left;
     }
 
-  while (hole)
+  while (left)
     {
-      sb->lost_bytes += scoreboard_hole_bytes (hole);
-      hole->is_lost = 1;
-      prev = hole;
-      hole = scoreboard_prev_hole (sb, hole);
-      if (hole)
-	bytes += prev->start - hole->end;
+      bytes += right->start - left->end;
+      sb->lost_bytes += scoreboard_hole_bytes (left);
+      left->is_lost = 1;
+      right = left;
+      left = scoreboard_prev_hole (sb, left);
     }
   sb->sacked_bytes = bytes;
 }
@@ -815,7 +818,8 @@
 {
   sack_scoreboard_hole_t *hole;
   hole = scoreboard_first_hole (&tc->sack_sb);
-  return (!hole || seq_geq (hole->start, tc->snd_una));
+  return (!hole || (seq_geq (hole->start, tc->snd_una)
+		    && seq_lt (hole->end, tc->snd_una_max)));
 }
 
 void
@@ -974,6 +978,14 @@
 	}
     }
 
+  if (pool_elts (sb->holes) == 1)
+    {
+      hole = scoreboard_first_hole (sb);
+      if (hole->start == ack + sb->snd_una_adv
+	  && hole->end == tc->snd_una_max)
+	scoreboard_remove_hole (sb, hole);
+    }
+
   scoreboard_update_bytes (tc, sb);
   sb->last_sacked_bytes = sb->sacked_bytes
     - (old_sacked_bytes - sb->last_bytes_delivered);
