Fix crash when creating a new account