fix off-by-one error on the progress and fix vars in ToolExistsPrecondition