fix branch count