more fixes to new SharedPtr<> class