Corrected errors in the cache loader and run func