fixed bug on cachemode