update and fix crash