Revert "Merge pull request #1686 from zz9pzza/issue_4007"

This reverts commit 7a14796d5b0707820744726e56a94fd30e87bb49, reversing
changes made to 242c0006dd45751a65ef739a7b48f925194d777b.