a fix to the Invoke-UIAWizard cmdlet (the index problem)