Fixes multiple callbacks to onLeave when fitSections is on