fix /$/ behaviour out of iframe.