Makes the branch detection happen before the ripple operation. Fixes the branch detection bug