Fixed the state change.