fix crash when dinin