Fix tests with caching