This actually may not have been the only issue. I'm still having trouble with this. Not sure if I have an option set incorrectly, or an option not set, but it's the same code I use in other places on the site, not sure why it's doing this on this occasion.