CMS detection fix