fix bug where no referer