Fixed branching issues