Fix for Internet explorer. He doesnt like parentElement. Switched to parentNode instead