Fix build shared_ptr issue