Merge pull request #2755 from alex/forward-port

Forward port the 1.2.3 changes