fix crash on startup