bug fix to referer url