Fix NullPointerException that can happen after onDestroy() is called.