Fix from closed PR #2967