Fix session ID detection when header does not include extra lines