Take into account that pack and/or purge can last longer than the frequency, and don't set the latch with a negative value