minor fixes to script and queryTorture