The problem of putting consistent theories together in institutions is discussed. A general necessary condition for consistency of the resulting theory is carried out, and some sufficient conditions are given for diagrams of theories in which shapes are tree bundles or directed graphs. Moreover, some transformations from complicated cases to simple ones are established.