corrected faulty caching