bug fixed
improved the removeChild function