I once wrote a scriptlet to handle this kind of issues… maybe it helps.
If it doesn’t, you could also try to use a rackspace script, which worked more reliable in some cases (but the scriptlet would be more flexible).