Fixed a bug in logging branching constructs