application restart handling improvements