Adding changes matching 1406a40 (#5816)

Matching 1406a40