fix crash in game