fixed branching issues