fix email errors