fix email duplication bug