Gaurding against edge case regarding parentNode