Fix setting state