Fixing error handling where tr was undefined if there's no cache.