bug fixing for email