More script fixs for commit 8994b6d25aec49377c649af9e61c1b6df623961e