fix a few branching things