Maintenance -> Update Counters - > Rebuild Styles. Select Yes for both Check For Styles With No Parent and Renumber all templates from 1.