Added sweet optimization of state on different thread