Fixed NullReferenceException when unsubscribing.