shared pointer fix