fix shared ptr conversion