a partial fix to the Get-UIACurrentPattern cmdlet