Fixed error in updating emails.