Fix Main PowerShell Script