Fix in On-Off histogram generating