fixed bug with header, and loading building data in directive