Use safe removeChild() to prevent Safari runtime JS error.