Use the proper median of the list.
Correct a possible underflow that may crash LS2.