improvements in script install and bug fix in variables