Fixes to CFG and Basic Block generation