Fix cache clearing