Update valueOf to generate the current state too.