fix restart behavior after settings changed.