Revert "Upstream fixes"

This reverts commit e5ffda6a41793326c61622011035d75165b644c3.
Defer script