Using std/boost make_shared for creating shared pointers
Fixed boost::function nulling issue