fix parial block writing in caches