Fixes caching bugs.