Fix the copy of cache string. Fix segment errors. Testing...