Fix directory caching.