Fix cache creating