hunted a npe, fixed referrer parsing