Fixed emailing issue