Added CPU reset grace period and automatic trimming