fix initialization bugs of factorgraph stuffs
Merge pull request #1476 from hushell/dev_bugs

fix initialization bugs of factorgraph stuffs