fixed all the bugs in CMS