Fix errors on system and admin pages, and fix directives-section count.