a couple of mods to improve manifest script performance.