fix maintain childcount bugs.