Use primary flag instead of primaryemail var