fix return issues by unconditionally branching to an exit block for each function on return