Fixed parentNode bug