Change the way save state and auto change mode