Minimize critical section