Looking at the code, it's probably off-by-one in one direction or the other -- but I'd probably change the distance on the left side (near the start) rather than on the right side (at the end).  It all depends on what you mean by "distance."