Needs to be atomic.