Fix crash on first login