Merge pull request #5079 from senivam/3x_merged

update the 3.x branch with actual master