Email handling fix