Fix warning on double sampleEnd (which is not true)