Revert "sync with the last master pull request"

This reverts commit 243f6784c96f9fe5582492ddf058ea045320b7ac.