fix crash when subscribe