Fix send emails bug