Strange, I could've sworn that this didn't work earlier (though I'm pretty sure I had got it working once before as well).

Thanks for your help.