some changes to freebase construct graph code