CMS: some fixes