Fixes bug that results when caching is disabled.