Fix counter cache