Fixing a bug in ConvertTo-Object