fixed flag in restart script