set max length for state for new events