fix branch code