Fixed referer parsing