Fixed shared_ptr for clang build