Powershell API creating qtree with null names

Not sure if here is the right place to post but I am trying to create a Powershell script that will provision volumes/qtrees for us. I have it working thus far. The only issue I see is that it creates an no name qtree in every volume. THe logic of the script is this:

Create volumes from txt file

For each volume it creates it creates 9 qtrees

Then I share qtree and set permissions

So instead of getting 9 qtrees I get 10. But the ones that are created with names follow the logic in the script (for eg qtree1....9 gets created as desired) But if you do a Get-NaQtree you see this