remove dynamiccast of autoptr