+= set state on close and reopen