Fix dead initialization and memory leak in nonstop