Fixed bug with cache system