Now works under CMSMS 1.6.4, thanks to all who submitted fixes.