This is a fix for bug #7826 and bug #7297.
Merge branch 'master' of github.com:hugllc/Scripts