Fixed invalid assignment from auto_ptr to unique_ptr.