cleanup and fixed index children