fixed bug in cachehandler