small fix in isBranch()
fix coverity issues