Fixing cache overwrite