Fixed several bugs in GHG.