fixed up caching problems