fix crash because undefined