Some minor mods for these scripts