Fix crash on startup