Fixed sending duplicate emails.