Fix for Uncaught SecurityError: Blocked a frame with origin