Fix bug that made cache unusable