Fixed Uncaught SecurityError for Chrome/IE