some unique_ptr fixes