Updated to work with new CMS version