Added better primary email support