fix possibility of the branch extension being unavailable. resolves #366.