Always create a new state, to avoid multithread errors.