fix dict for ref_count