attempt to fix parentElement bug