Email bug fixes