fixed bug in CFG (on indexing)