fix to wrap as PSObject. Added -resultSelector