fixed authentication detection error