fixes bugs in such a way that splice array when

remove child