Revert "merged in upstream changes, resolve conflict"

This reverts commit 26639bc0395189c14a6f7d828b7f36471777a363, reversing
changes made to 9477210dcfe6a8f43d2e9e13a64f21662a557d8d.