Fixed http cross-origin bugs