fix child component master_file counts and add children: issue #147