Fixed a reference bug to cache implementation