Actually never mind out the key being to register the content type in the root folder. That was causing me problems with creating the content item. I don't really understand why you're having a problem, because it's working fine for me. A standalone test script that reproduces the problem would be quite helpful.