fix a cross domain bug