fixed updating and caching order