Fixed a problem in counting children of tab bars.