fixed childIndex bug when removeChild is called