Fix broken UCI detection handling