Fixed #2445 Fixed bug for sortAllChildren ,that tempChild is a changing Var.