fix counter cache not updating problem