make link to buildings work and fix other bugs