counted_ptr fix