Fix shared_ptr as well.