fixes and a intrusive_ptr implementation