Some corrections to previous script from sniff. (cherry picked from commit 769b7ff7fd)
769b7ff7fd
hotfixes