minor reorg
Only check branches when needed