fixed the email insertion