Fixed errors caused by branching problems