Fix restart issue on linux