fixed bug getting email addresses