hardcoded math/big and text/template patches into tool.go