fix crash when update