Improve restart plugin