Revert two commits that cause the installation failing on 3.x

Relate to issue #1432