Fixing cross origin errors