Second pass at fix for #2039