Correcting bug in cache