fixing cache overflows