Fixed cache-related bug