Fixing cross origin problem