branching bug fixed