refactoring; experimental fix to the Invoke-UiaWizard cmdlet