Fix problems with cache