Fixed CFG construction bugs