fix error when element is not an iframe