Fixed a bug in DynamicPowershell