fix a crash on startup