Fix issue with cross domain requests