Fixes in shared_ptr.