so that's where i was going wrong. I'd suggest putting notes into the documentation on small bits like that where relevant though since things like that will help anyone else wanting to try and script for this.