fix the crash on startup