WIP: fixing more AutoPtr
WIP: fixing more AutoPtr