fix referer check