Fixed issue with not waiting for Doc caches.