made map template wait until collections are loaded