handle nmt shutdown and restart