Work-around to avoid "Unsafe JavaScript attempt to access frame" warning