fix branch condition