Fixed shared_ptr issue

Changed from the shared_ptr constructor to make_shared to help make sure
we do not leak memory.