Fix delete branch code and relationship branch code change