EDG3 cherry-picking from Jean Utke