Clear network callback on app crash

The network callback would still be called after a program crash. Still
requires an app to clean up after itself on normal termination.