bug fix: restore state on sighup