Bug fix - hysteresis was not applied