Correctly exclude end