some more support for weak_ptr