Mimic the previous behaviour without recomputing the ending section each time
Fix some tests