fix for TR1 with shared_ptr