Fixing issue when email is disabled