Revert commit until script exploits are fixed

This reverts commit 0f4a21eed14370b796088739a2be015be524d182.
The commit introduced a script exploit.