Updated ExtensionMethods to handle cross domain issues.