Fix cache cleanup