Fix error in #branch method