Fixed bug in text-cache.