Add statement in AddCommand for updating state manager