Use set_state in im.exit_state