Fixing branch recognition