fix crash issue