properly remove flags that don't exist when CMS is not available