Fix argument order for branch_ functions