Fixed bugs in CFG