fixing cache write issue part 2