Fix a bug where closing NetworkManager exits the wholel app which is not what we want