Fix crash on startup bug