Fix segfault when exiting status monitor.