Updated branch handling.