Fix to avoid cross domain error