fixes pre restart script