fix the counter cache issue