Fix id checks