caching some resources and fixed local name calculation