Fixed branch name retrieval